#ifndef _NVMEM_H_
#define _NVMEM_H_
#include "mem.h"

class nvmem:public mem
{
public:
    std::string mem_file_path;
    std::fstream fp;
    nvmem(std::string mem_file_path,uint32_t size);
    ~nvmem();
    uint8_t getB(uint32_t pointer);
    uint16_t get2B(uint32_t pointer);
    uint32_t get4B(uint32_t pointer);
    void putB(uint32_t pointer,uint8_t data);
    void put2B(uint32_t pointer,uint16_t data);
    void put4B(uint32_t pointer,uint32_t data);
    void sync();
    int process(rib* rib,uint32_t tick=0) override;
};

#endif // !_MEM_R_H_
